package cn.livingCloud.service.impl.operation;

import cn.livingCloud.dto.CaseCancelFormDto;
import cn.livingCloud.dto.JsonDto;
import cn.livingCloud.entity.core.CaseStatus;
import cn.livingCloud.entity.core.Employee;

import java.util.List;

/**
 * Created by 唐旭 on 2016/6/6.
 */
public class CaseCanceler extends CaseOperator {
    public CaseCanceler(CaseCancelFormDto formDto) {
        super(formDto);
    }

    @Override
    protected JsonDto operation() {
        super.aCase.setStatus(CaseStatus.CANCELLED);
//        super.aCase.setOwnerId(null);
        JsonDto jsonDto = new JsonDto();
        jsonDto.setState(true);
        msgService.sendCancelMsg(aCase, form.getContent());
        return jsonDto;
    }

    @Override
    protected List<Employee> getNewOwners() {
        return null;
    }
}
